/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.menosehmais.business;

import br.com.caelum.vraptor.ioc.Component;
import br.com.menosehmais.dto.ServicoDeDesignDTO;
import br.com.menosehmais.framework.business.CrudBusinessObject;
import br.com.menosehmais.model.ServicoDeDesignDO;
import br.com.menosehmais.persistence.ServicoDeDesignDAO;
import java.util.List;

/**
 *
 * @author Rafael Quintino
 */
@Component
public class ServicoDeDesignBO extends CrudBusinessObject<ServicoDeDesignDO, ServicoDeDesignDAO> {
    
    public ServicoDeDesignBO( ServicoDeDesignDAO dao ){
        super(dao);
    }

    public List<ServicoDeDesignDO> listarTodosServicosDesign() {
        List<ServicoDeDesignDO> lista = dao.selectAll();
        return lista;
    }

    public List<ServicoDeDesignDO> listarServicosDesignFiltrados(ServicoDeDesignDTO servicoDTO) {
        List<ServicoDeDesignDO> lista = (List) dao.selectStringListByFieldLikeString("nome", "%"+servicoDTO.getFiltroNome()+"%", true, 0, 30);
        return lista;
    }

    
}
